package com.easychat.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author 10 2024/10/4
 */
@Getter
@AllArgsConstructor
public enum UserStatusEnum {
     ENABLE(1,"账号正常"),
     NOT_ENABLE(0,"账号已禁用");

     private Integer status;
     private String desc;
     public static UserStatusEnum getByStatus(Integer status){
          for(UserStatusEnum statusEnum : UserStatusEnum.values()){
               if(statusEnum.getStatus() == status){
                    return statusEnum;
               }
          }
          return null;
     }
}
